/*

Author   : chaos

FileName : stream_fun.cpp

Date     : 16/08/17 09:59:12

*/
#include <iostream>
using namespace std;

int main(int argc ,char *argv[])
{
    double d = 24.5467865;
    int n = 24;

    cout << "Using ios's member function [width adn setf()]...";
    cout << endl;
    cout.width(10);
    cout.setf(ios::oct,ios::basefield);
    cout.setf(ios::right);
    cout << n << endl;

    cout << "Using ios's member function [precision]..." << endl;
    cout.precision(4);
    cout.setf(ios::scientific);
    cout << d << endl;
    cout.unsetf(ios::scientific);
    cout << d << endl;

    return 0;
}
